/**
 * 路径导入辅助模块 - 统一配置入口模式
 * 通过统一配置入口引用辅助模块，避免直接依赖路径
 */

// 导入路径解析器
const pathResolver = require('../config/path_resolver.js');

// 从统一配置入口导入辅助模块
const { Helpers } = require('../../../../../../config/module_config.js');

// 解构所需的辅助模块
const {
  pageHelper,
  cloudHelper,
  requestHelper,
  timerHelper,
  cacheHelper,
  routerHelper,
  timeHelper,
  dataHelper,
  formHelper,
  validate
} = Helpers;

// 导入项目配置
let projectSetting = {};
try {
  projectSetting = require('../../../../../../config/projects_config.js');
} catch (e) {
  console.error('无法导入projects_config.js，使用默认配置');
  // 提供默认配置
  projectSetting = {
    USER_FIELDS: [],
    DEPT_OPTIONS: [
      { label: '默认部门', val: 'default' }
    ]
  };
}

// 导出所有模块
module.exports = {
  pathResolver,
  pageHelper,
  cloudHelper,
  requestHelper,
  timerHelper,
  cacheHelper,
  routerHelper,
  timeHelper,
  dataHelper,
  formHelper,
  validate,
  
  // 项目配置
  projectSetting
};